$OpenBSD: patch-src_s_openbsd_h,v 1.3 2017/05/12 21:26:32 espie Exp $
Index: src/s/openbsd.h
--- src/s/openbsd.h.orig
+++ src/s/openbsd.h
@@ -9,3 +9,20 @@
 /*  David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this
     is necessary.  Otherwise Emacs dumps core when run -nw.  */
 #undef LIBS_TERMCAP
+
+/*  Idea From the FreeBSD port. Seems to work well.
+    Needs testing and then commiting to emacs developers */
+#define TERMINFO
+#define LIBS_TERMCAP -lncurses
+
+/*  We don't need rpath */
+#ifdef __ELF__
+#undef LD_SWITCH_SYSTEM
+#define LD_SWITCH_SYSTEM -L/usr/X11R6/lib -L/usr/local/lib
+#undef C_SWITCH_SYSTEM
+#define C_SWITCH_SYSTEM -I/usr/X11R6/include -I/usr/local/include -L/usr/local/lib
+#endif
+#ifdef __clang__
+#undef LIB_STANDARD
+#define LIB_STANDARD -lcompiler_rt -lc -lcompiler_rt /usr/lib/crtend.o
+#endif
